Learn How to Create a Light Rays Custom Effect from Scratch |
您所在的位置:网站首页 › cc light rays › Learn How to Create a Light Rays Custom Effect from Scratch |
Custom Light Rays Preview
![]() A custom effects is special kind of preset that looks and behaves like a plugin. It allows you to save a special recipe of plugins and keyframes into something that you can reuse with ease. Jorrit Schulte has been producing a bunch of these very useful custom effects and providing them for free at http://aenhancers.com. In this tutorial he breaks down how to create the incredibly popular light rays effect and how to package it all into a custom effect. We're going to break down how you create a light ray effect, like shine, and then we're gonna learn how to create a preset so you can use it again any time you like inside of the preset. Finally we are going to make that preset into a custom effect using a script from nabscripts.com. Download ScriptcreateCustomEffect.jsx Step 1Let's start by creating the Custom Effect with all the Controls,what a Custom Effect is. It is just one 'effect' with all expression controls in it, only it is much easier to control especially if you have lots of controls.This script as is only works in AE 7 so if you are working in AE 7.0 you can skip Step 1 & 2. Otherwise we are going to quickly edit the script to make it work in CS3 or CS4. Lets open the script in Adobe ExtendScript Toolkit by double clicking it.. Step 2Lets go in and do "Edit > Find And Replace"and find: 7.0 Replace: CS3 (or CS4 if you are working in CS4)click Replace All, you get a Message that 5 Items are replaced, click OKThen save the script ![]() ![]() ![]() Now place the script inside of your AE Scripts Folder (C:\Program Files\Adobe\Adobe After Effects CS3\Support Files\Scripts\ in CS3 on Windows), (Applications/Adobe After Effects/Scripts on Mac) ![]() ![]() ![]() Lets start AE and start creating the Custom Effect.Run the script by going "File > Script > createCustomEffect.jsx" ![]() ![]() ![]() A New window pops up, this script is great I really like it but it is kind of limited.You can't change the order, or add groups and things like that.So let's just type a name and a matchName (that is without spaces) and leave the rest as it is.Hit Create. AE will close. ![]() ![]() ![]() Let's open the PresetEffects.XML file where all the Custom Effects Codes are saved, in CS3 on windows, the standard file path is C:\Program Files\Adobe\Adobe After Effects CS3\Support Files\. On Mac you need to right-click on the After Effects application icon and choose "Show Package Contents" ![]() Then the path is "Contents/Resources/PresetEffects.xml" ![]() ![]() ![]() Open PresetEffects.XML in Adobe ExtendScript Toolkit and scroll all the way to the bottom, there you will see our Custom effect. ![]() ![]() ![]() Now lets start by adding controls to the custom effect. I took the time to create a text file with all the Custom Effect codes I know so you can use it on your own, it is included in the preset download at the end of this tutorial. I will show you some controls to get you started. (If things don't make sense, check the Custom Effect codes text file and hopefully things will make more sense.) First add a group called Pre-Process. ![]() ![]() ![]() Let's add a Checkbox and 2 Sliders inside of this Group. ![]() ![]() ![]() We put a Point after this group, we want this Point to be at the center of the Comp at default. At the end of the Custom Effect codes text file, you see a Center Point Lets add that. ![]() ![]() ![]() You can see the completed Custom Effects from the Final Preset available for download at the end of this tutorial, so let's move on and start After Effects again. ![]() ![]() ![]() When you start you get a message asking if you want to clean up the startup script, click yes. There's a new comp automatically made called 'my Custom Effect Comp'in that comp there's a layer called 'my Custom Effect' then look at the Effect Controls for that layer, and there it is, our Custom Effect! ![]() ![]() ![]() Make a new comp, choose whatever settings you like, create some text so we can see what we're doing. Then copy and paste the Custom Effect from'my Custom Effect Comp' to this text layer. ![]() ![]() ![]() First let's add the effect that will be the basis of our ligh rays, go "Effect > Blur > Sharpen > CC Radial Fast Blur" ![]() ![]() ![]() We want these rays to be bigger, the further the source point is from the center of the comp, CC Radial Fast blur does not do this automatically, so let's add an expression for the Amount by Alt + Clicking on the stopwatch. The first part of the expression will represent the center of the comp, so we are going to create 2 variables 1 for X and one for Y axis: 1 X = thisComp.width/2; //(center in X axis) Y = thisComp.heigt/2; //(center in Y axis) SP = effect("Light Rays")("Source Point"); //(the Source Point from the Custom Effect)Now we need the expression that will calculate the distance between the XY center and the Point,there is a command for that called 'length' so lets type:length (SP, [X,Y])That's a little too much so add /10 right at the end of that:length (SP, [X,Y])/10now we need to add to that the ray length slider which is too small so add *2: +effect("Light Rays")("Ray Length") *2Here is that full expression:X = thisComp.width/2; //(center in X axis) Y = thisComp.heigt/2; //(center in Y axis) SP = effect("Light Rays")("Source Point"); //(the Source Point from the Custom Effect)length (SP, [X,Y])/10 + effect("Light Rays")("Ray Length") *2We also need to add an expression for the center of CC Radial Fast Blur, so just use the pickwhip to the Source Point. The expression should come out to this:effect("Light Rays")("Source Point") ![]() ![]() ![]() If CC Radial Fast Blur's Amount is at 100, it will not go any further because that is the maximum value of this effect, to overcome this we need to duplicate CC Radial Fast Blur.To this duplicated effect we need to add at the end of the amount expression -100 so when the first one stops, the second one starts growing. The expression for the duplicated effect should look like this: 1 X = thisComp.width/2; //(center in X axis) Y = thisComp.heigt/2; //(center in Y axis) SP = effect("Light Rays")("Source Point"); //(the Source Point from the Custom Effect)length (SP, [X,Y])/10 + effect("Light Rays")("Ray Length") *2 -100![]() ![]() ![]() Everything looks great so far, now we are going to take a look at the Pre-Process group, which are the mask options. We are going to use 'Circle' for that. Go "Effect > Generate > Circle" and put it above the CC Radial Fast Blur. ![]() ![]() ![]() The result is not what we want, we want this to represent the alpha so let's set the Blending Mode of 'Circle' to Stencil Alpha. ![]() ![]() ![]() If the 'Use Mask' checkbox from our Custom Effect is checked, we want our circle to not be visible. We can't shut this effect off with expressions, so as a workaround we can make the circle very big so it never cuts off the text or whatever layer you are using it on.Let's alt + Click on Radius to add an expression, Type: 1 if( and Pickwhip The 'Use Mask' Checkbox. Then after that type: == enabled){ //(this is what happens when it's checked, make sure there's 2 =='s) and then pickwhip the Mask radius Option from the Custom Effect. effect("Light Rays")("Mask Radius") }else{ // this is what happens when it is not checked10000 } //(which is the maximum value) Here is the full expression:if (effect("Light Rays")("Use Mask") == enabled) {effect("Light Rays")("Mask Radius")} else {10000 }And finally, under the Group 'Feather' from the Circle effect, Alt + Click on 'Feather Outer Edge'and use the Pickwhip and pickwhip to 'Mask Feather' from our Custom Effect:effect("Light Rays")("Mask Feather")also, do the same thing for the Circle's Center and the Source Point.![]() ![]() ![]() We're gonna work on the Blur Group now. Go "Effect > Blur > Sharpen > Radial Blur" and put it right below Circle. Set the 'Type' to Zoom & the 'Antialiazing (Best Quality)' to High. ![]() ![]() ![]() We're going to add an expression for amount (Alt + Click) almost the same as the last one: 1 if(effect("Light Rays")("Use Blur") == enabled){ effect("Light Rays")("Ray Length") }else{ 0 }and again pickwhip the center to the source point: effect("Light Rays")("Source Point") ![]() ![]() ![]() Let's move on to the color group, there are 3 colors so we are going to use the 'tritone' effect.Let's add "Effect > Color Correction > Tritone" making sure to keep it below everythingand Alt + Click on the colors from tritone and pickwhip them to the Color Controls from the Custom Effect with the same name. ![]() ![]() ![]() Nothing happens, the colors won't change. This is because Tritone looks only at RGB channels. To fix this we need a kind of Alpha to RGB + Alpha (or RGBA) converter, we can do that using a cool technique that I found. First let's add a Glow effect:"Effect > Stylize > Glow" ![]() ![]() ![]() That's not quite what we want, it is really bright and blown out. To achieve the effect we're looking for lets use these options: Set the Glow Threshold, Radius and Intensity To 0, 'Composite Original' to On Top And the 'Glow Operation' to None.Now, we have our neat Alpha to RGBA converter, which is also included by the final preset file as an individual preset (Called 'Alpha to RGBA Colors'). Quick Tip: As you can see in the image below, you can't see the Shadow color. Duplicate the Glow to see it, or if you want a bit more glowy look. ![]() ![]() ![]() Twirl open the 'Circle' and Alt + Click on the Opacity in circle and pickwhip that to the Shine Option From the Custom Effect.The Glow will make a weird, but cool looking effect that, while fading the opacity, first lowers the highlights, then the midtones and then the shadows, pretty cool. For a normal opacity, you can use the layer's transform opacity. ![]() ![]() ![]() For the boost light option, add Brightness Contrast"Effect > Color Correction > Brightness ContrastAnd Alt + click on 'Brightness' and Pickwhip it to 'Boost Light' and Add *2: 1 effect("Light Rays")("Boost Light") * 2 do the same Thing For 'Contrast':effect("Light Rays")("Boost Light") * 2![]() ![]() ![]() Use the image below as a reference to give all the controls appropriate names by selecting the effect name and hitting Enter. Finally reset the custom effect by clicking 'Reset' at the top of the effect. Now it is ready to be saved as a preset (Glow is now Called: Alpha to RGBA Colors (Copy Me)) ![]() ![]() ![]() To save it as a Preset, open the Effects Presets window, Select everything you want to save and click on the little post-it button in the lower right corner. ![]() ![]() ![]() A save sialog box comes up, go to "C:\Program Files\Adobe\Adobe After Effects CS3\Support Files\Presets" on Windows or on Mac go to "/Application/Adobe After Effects CS3/Presets"I'm going to create a new folder called 'Jorrit Schulte' and inside another one called 'Light Rays'.In there, i'll will save the preset as 'Light Rays.ffx' ![]() ![]() ![]() Now that we have our preset saved, lets create a little project using the preset.Create a new Comp, choose whatever settings you want. and a layer that is comp size. Call that layer 'Planet' ![]() ![]() ![]() Add "Effect > Noise Grain > Fractal Noise"Change the 'Fractal Type' to Dynamic, set the 'Contrast' to 75 and set the 'Brightness' to -15 ![]() ![]() ![]() Add "Effect > Color Correction > Curves" Play with the settings until you get a cool looking color like this orange: ![]() ![]() ![]() Let's add "Effect > Perspective > CC Sphere"Set the 'Radius' to 150.Under the 'Light' Group set 'Light Height' to 100. ![]() ![]() ![]() Now that we have our simple planet, lets go on with the Light Rays part.Create a new solid called Light Rays, make it comp size and hit OK. ![]() ![]() ![]() Let's add "Effect > Noise & Grain > Fractal Noise" again. Set the 'Fractal Type' to Dynamic, set the 'Contrast' to something very high like 700 and the 'Brightness' to about -100 ![]() ![]() ![]() Copy The 'CC Sphere' Settings to the 'Light Rays' layer.Pre-Compose it, we do this because otherwise the edges will get cut off. ![]() ![]() ![]() Apply our Light Rays preset, and hit Reset for 'Light Rays' ![]() ![]() ![]() Lets set the shadow color to a pure black, and we can set the midtones to some cool fiery orange color (I use #B46928 here). Also set the 'Boost Light' to 7.5 and the 'Ray Length' to about 43. Finally, set the transfer mode of the Light Rays Pre-Comp to 'Add' ![]() ![]() ![]() Under 'FX: Rays' set the 'Zoom' to Brightest, set the Custom Effect's 'Opacity' a little bit lower. I also added a curves effect to get this final look (I'll leave this part for you to figure out). ![]() ![]() ![]() We're going create a quick star background. Create a new white solid called BG, make it comp size and hit OK. Place the solid on the bottom of the timeline. ![]() ![]() ![]() go "Effect > Simulation > CC Star Burst". Play with the settings until you get something you like this. Make sure 'Speed' is set to 0 so the background doesn't move. ![]() ![]() ![]() Here's what it looks like: ![]() ![]() ![]() We have created a preset from start to end, including creating the custom effect,after that we've created a very basic planet with our preset We've had some fun time, well... I did, if you not, you are probably not reading this...ah well, I will see you next time DownloadFinal Preset & Associated Files |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |